﻿using System.IO;

namespace Perceptron.Engine
{
    public class ClassObject<T>
    {
        public ClassObject(int classId, string className, T tobject)
        {
            ClassId = classId;
            ClassName = className;
            Object = tobject;
        }

        public int ClassId { get; private set; }
        public string ClassName { get; private set; }
        public T Object { get; private set; }
    }

    public class ClassImage : ClassObject<BinaryLineImage>
    {
        public ClassImage(int classId, string className, FileInfo file, BinaryLineImage tobject)
            : base(classId, className, tobject)
        {
            FileName = file.Name;
            FullFileName = file.FullName;
        }

        public string FileName { get; private set; }
        public string FullFileName { get; private set; }

        public override string ToString()
        {
            return string.Format("{0} ({1})", FileName, ClassName);
        }
    }

    public class BinaryLineImage
    {
        public BinaryLineImage(byte[] bytes)
        {
            Bytes = bytes;
        }

        public byte[] Bytes { get; private set; }
    }
}
